<template>
  <div>
    大儿子的玩具，{{ toy }} <button @click="sendToy">玩具给弟弟</button>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import emitter from '@/utils/emitter';

let toy = ref("迪迦奥特曼")
function sendToy() {
  emitter.emit('sendToy', toy.value)
}
</script>

<style lang="scss" scoped>

</style>